import * as THREE from 'three'

const geometry = new THREE.BufferGeometry()

const vertices = new Float32Array([
    0, 0, 0,
    100, 0, 0,
    0, 100, 0,
    0, 0, 100,
    100, 100, 0,
])

const attribute = new THREE.BufferAttribute(vertices, 3)
geometry.setAttribute('position', attribute)

const material = new THREE.LineBasicMaterial({
    color: new THREE.Color('orange'),
    size: 10
})
//线模型
// const line = new THREE.Line(geometry, material)
//首尾相连的线模型
// const line = new THREE.LineLoop(geometry, material)
//线段模型
const line = new THREE.LineSegments(geometry, material)

export default line